package com.hz.filesystem.web;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hz.filesystem.entity.HzFileEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * 
 * @author txw_cyl
 * @email sunlightcs@gmail.com
 * @date 2022-04-22 20:37:21
 */
@Data
public class FoundFileEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 文件id
	 */
	@TableId
	@ApiModelProperty(value = "文件id", dataType = "Long")
	private Long id;
	/**
	 * 文件所属0：公共1：私人
	 */
	@ApiModelProperty(value = "文件所属0：公共1：私人", dataType = "Integer")
	private Integer fileBelongto;
	/**
	 * 文件类型0：目录1：文件
	 */
	@ApiModelProperty(value = "文件类型0：目录1：文件", dataType = "Integer")
	private Integer fileType;
	/**
	 * 文件地址src
	 */
	@ApiModelProperty(value = "文件地址src", dataType = "String")
	private String fileAddress;
	/**
	 * 文件大小
	 */
	@ApiModelProperty(value = "文件大小", dataType = "String")
	private String fileSize;
	/**
	 * 文件名称
	 */
	@ApiModelProperty(value = "文件名称", dataType = "String")
	private String fileName;
	/**
	 * 文件下载次数
	 */
	@ApiModelProperty(value = "文件下载次数", dataType = "Integer")
	private Integer fileLoaddownCount;
	/**
	 * 上传人老师id
	 */
	@ApiModelProperty(value = "上传人老师id", dataType = "Long")
	private Long tid;
	/**
	 * 单位名
	 */
	@ApiModelProperty(value = "单位名", dataType = "String")
	private String unitName;
	/**
	 * 教师名
	 */
	@ApiModelProperty(value = "教师名", dataType = "String")
	private String teacherName;
	/**
	 * 联系方式
	 */
	@ApiModelProperty(value = "联系方式", dataType = "String")
	private String phone;
	/**
	 * 省地址id
	 */
	@ApiModelProperty(value = "省地址id", dataType = "Long")
	private Long pid;
	/**
	 * 市地址id
	 */
	@ApiModelProperty(value = "市地址id", dataType = "Long")
	private Long cid;
	/**
	 * 区/县地址id
	 */
	@ApiModelProperty(value = "区/县地址id", dataType = "Long")
	private Long aid;
	/**
	 * 创建时间
	 */
	@ApiModelProperty(value = "创建时间", dataType = "Date")
	private Date createTime;
	/**
	 * 修改时间
	 */
	@ApiModelProperty(value = "修改时间", dataType = "Date")
	private Date updateTime;

	public FoundFileEntity(){

	}
	//拷贝
	public FoundFileEntity(HzFileEntity file){
		if(file != null){
			this.id = file.getId();
			this.fileBelongto = file.getFileBelongto();
			this.fileType = file.getFileType();
			this.fileAddress = file.getFileAddress();
			this.fileSize = file.getFileSize();
			this.fileName = file.getFileName();
			this.fileLoaddownCount = file.getFileLoaddownCount();
			this.tid = file.getTid();
			this.unitName = file.getUnitName();
			this.teacherName = file.getTeacherName();
			this.phone = file.getPhone();
			this.pid = file.getPid();
			this.cid = file.getCid();
			this.aid = file.getAid();
			this.createTime = file.getCreateTime();
			this.updateTime = file.getUpdateTime();
		}
	}
}
